package com.taotao.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fasterxml.jackson.core.type.TypeReference;
import com.taotao.common.service.HttpClientService;
import com.taotao.search.pojo.Item;

@Service
public class ItemService {
	
	@Autowired
	private HttpClientService httpClientService;

	/**
	 * 根据id查询商品信息
	 * @param id
	 * @return
	 */
	public Item queryItemById(Long id){
		return this.httpClientService.doGet("http://manage.taotao.com/rest/api/item/" + id, new TypeReference<Item>() {
		});
	}
}
